import pandas as pd


def save_to(df:pd.DataFrame, f_out:str):
  if f_out.endswith('.feather'):
    df.to_feather(f_out)
  elif f_out.endswith('.csv'):
    df.to_csv(f_out)
  else:
    raise NotImplementedError('# [ERROR] unsupported file format')